using System.Collections.Generic;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal class OracleLpCompoundBinaryExpression : OracleLpCompoundExpression
	{
		protected OracleLpCompoundExpressionBinaryOperator m_vBinaryOperator;

		protected OracleLpExpression m_vLeftOperand;

		protected OracleLpExpression m_vRightOperand;

		public OracleLpCompoundExpressionBinaryOperator BinaryOperator
		{
			get
			{
				return m_vBinaryOperator;
			}
			set
			{
				m_vBinaryOperator = value;
			}
		}

		public OracleLpExpression LeftOperand
		{
			get
			{
				return m_vLeftOperand;
			}
			set
			{
				m_vLeftOperand = value;
				if (value != null)
				{
					value.ParentExpression = this;
				}
			}
		}

		public OracleLpExpression RightOperand
		{
			get
			{
				return m_vRightOperand;
			}
			set
			{
				m_vRightOperand = value;
				if (value != null)
				{
					value.ParentExpression = this;
				}
			}
		}

		public OracleLpCompoundBinaryExpression(OracleLpStatementElement parent)
			: base(parent)
		{
			m_vCompoundType = OracleLpCompoundExpressionType.BINARY;
		}

		public override void EvaluateDatatype()
		{
		}

		public override IList<OracleLpExpression> GetAllTerminalExpressions()
		{
			if (m_vAllTerminalExpressions == null)
			{
				List<OracleLpExpression> list = (List<OracleLpExpression>)(m_vAllTerminalExpressions = new List<OracleLpExpression>());
				list.AddRange(m_vLeftOperand.GetAllTerminalExpressions());
				list.AddRange(m_vRightOperand.GetAllTerminalExpressions());
			}
			return m_vAllTerminalExpressions;
		}
	}
}
